package com.softeem.service.impl;


import com.softeem.mapper.AdminMapper;
import com.softeem.pojo.Admin;
import com.softeem.pojo.model.LoginModel;
import com.softeem.service.AdminService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class AdminServiceImpl implements AdminService {

    @Autowired
    AdminMapper adminMapper; //依赖注入Mapper层

    @Override
    public Admin getAdmin(Integer id) {
        return adminMapper.selectById(id);
    }

    @Override
    public Admin login(LoginModel loginModel) {
        return adminMapper.selectByNameAndPwd(loginModel);
    }
}
